package io.renren.modules.app.dao;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.renren.modules.app.entity.ImApplyEntity;
import io.renren.modules.app.entity.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 *
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-04-22 14:16:37
 */
@Mapper
public interface ImApplyDao extends BaseMapper<ImApplyEntity> {

    @Select("SELECT a.id,a.user_id,a.friend_id,a.status,u.username,u.nickname,u.avatar FROM im_apply a,tb_user u WHERE a.user_id=u.user_id and a.friend_id=#{user.userId}")
    IPage<ImApplyEntity> selectPageAll(IPage<ImApplyEntity> params, UserEntity user);
}
